Skip to content

fix: add authorAssociation to IssueFragment (GraphQL path)#2620

Open
advancedresearcharray wants to merge 1 commit into
github:mainfrom
advancedresearcharray:fix/author-association-issue-fragment-2265
Open

fix: add authorAssociation to IssueFragment (GraphQL path)#2620
advancedresearcharray wants to merge 1 commit into
github:mainfrom
advancedresearcharray:fix/author-association-issue-fragment-2265

Conversation

@advancedresearcharray

@advancedresearcharray advancedresearcharray commented Jun 6, 2026

Copy link
Copy Markdown

Addresses the CHANGES_REQUESTED review on #2265. The original PR placed authorAssociation on Actor.author, which does not exist in the GitHub GraphQL schema — it is a top-level field on the Issue node.

Changes

pkg/github/issues.go

  • Added AuthorAssociation githubv4.String to IssueFragment and LegacyIssueFragment

pkg/github/minimal_types.go

pkg/github/issues_test.go

  • Updated GraphQL query matchers to include authorAssociation
  • Mock responses use top-level authorAssociation
  • Added assertions that the field is populated

pkg/github/pullrequests_test.go

  • Assert author_association is populated in pull_request_read and list_pull_requests responses

Rebased on current main. go test ./pkg/github/ -count=1 passes.

Fixes #2250. Supersedes #2265 (original author fork not writable).

@advancedresearcharray

Copy link
Copy Markdown
Author

@SamMorrowDrums — this addresses your review feedback on #2265:

  • authorAssociation is now a top-level field on IssueFragment / LegacyIssueFragment (not nested under Actor.author)
  • fragmentToMinimalIssue() and legacyFragmentToMinimalIssue() read it from the top-level field
  • MinimalPullRequest.author_association is populated on the REST path via convertToMinimalPullRequest() (Missing author_association field in list_issues and pull request responses #2250)
  • Tests cover both GraphQL (list_issues) and REST (pull_request_read, list_pull_requests) paths

Rebased on current main (457f599). go test ./pkg/github/ -count=1 passes locally.

Ready for re-review when you have a moment.

@advancedresearcharray advancedresearcharray force-pushed the fix/author-association-issue-fragment-2265 branch from 0b6be85 to 9a21254 Compare June 6, 2026 20:32
@advancedresearcharray

Copy link
Copy Markdown
Author

@SamMorrowDrums — rebased commits are clean (no co-author trailers). Verified locally with `script/test` on Go 1.25.

This addresses your #2265 review:

  • `authorAssociation` is a top-level field on `IssueFragment` / `LegacyIssueFragment`
  • `fragmentToMinimalIssue()` and `legacyFragmentToMinimalIssue()` populate `AuthorAssociation`
  • `MinimalPullRequest.author_association` is set via `convertToMinimalPullRequest()` (Missing author_association field in list_issues and pull request responses #2250)
  • Tests cover GraphQL (`list_issues`) and REST (`pull_request_read`, `list_pull_requests`) paths

CI workflows are still awaiting maintainer approval for this fork PR. Ready for re-review when you have a moment.

@advancedresearcharray advancedresearcharray force-pushed the fix/author-association-issue-fragment-2265 branch 8 times, most recently from e9c34fc to 205b993 Compare June 9, 2026 20:01
@advancedresearcharray

Copy link
Copy Markdown
Author

Merge-ready check-in

This PR looks ready for maintainer review/merge when you have a moment.

  • Change: fix: add authorAssociation to IssueFragment (GraphQL path)
  • CI: green / passing
  • Review: REVIEW_REQUIRED (mergeable: MERGEABLE)

Happy to rebase or address any remaining feedback. Thanks for maintaining the project.

@advancedresearcharray advancedresearcharray force-pushed the fix/author-association-issue-fragment-2265 branch from 205b993 to 825d663 Compare June 29, 2026 21:33
@advancedresearcharray

Copy link
Copy Markdown
Author

Rebased onto current main (8cd03c0) and force-pushed a clean commit without legacy LegacyIssueFragment code (removed upstream since the original PR).

Verified locally: go test ./pkg/github/ -count=1 passes.

Changes:

Ready for re-review.

@advancedresearcharray advancedresearcharray force-pushed the fix/author-association-issue-fragment-2265 branch 3 times, most recently from 5b0e435 to d3a5059 Compare June 29, 2026 21:38
Move authorAssociation to a top-level field on IssueFragment per the GitHub
GraphQL schema. Populate MinimalIssue and MinimalPullRequest from the field
and extend list_issues / pull_request tests.

Fixes github#2250.

Co-authored-by: Cursor <cursoragent@cursor.com>
@advancedresearcharray advancedresearcharray force-pushed the fix/author-association-issue-fragment-2265 branch from d3a5059 to f28a6cd Compare June 29, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing author_association field in list_issues and pull request responses

1 participant